import React, {Component} from 'react';
import {LeftOutlined,DownOutlined} from '@ant-design/icons'

class Ico extends Component {

    state={
        ico:<LeftOutlined/>
    }
    UNSAFE_componentWillReceiveProps(nextProps, nextContext) {
        if (nextProps.index === nextProps.myIndex){
            this.setState({
                ico:<DownOutlined/>
            })
        }else {
            this.setState({
                ico:<LeftOutlined/>
            })
        }

    }
    render() {
        return (
            <div>
                {this.state.ico}
            </div>
        );
    }
}

export default Ico;